Copy the following code directly, create a new file called thumbnailimage.php, the file name is best not in uppercase, the following code to copy in:
Copy Code code as follows:
Define (' Max_img_size ', 100000);
Supported Image
Phpgd2 uploads image text watermark, image watermark, and other proportional thumbnail source code. For more information, see.
The code is as follows:
// Upload file type list$ Uptypes = array ('Image/jpg ','Image/jpeg ','Image/png
Phpgd2 uploads the image text watermark, image watermark, and other proportional thumbnails implementation code. Copy the code as follows :? Php Upload file type list $ uptypesarray (imagejpg, imagejpeg, imagepng, imagepjpeg, imagegif, imagebmp,
Wordpress has three default thumbnail sizes: thumbnail (150x150), Graph (300x300), and large image (1024x1024). The latter two can only be scaled in proportion to the original image, for example, if the aspect ratio of the source image is, the size
Phpgd2 uploads image text watermark, image watermark, and other proportional thumbnail source code. For more information, see.
The code is as follows:
// Upload file type list
$ Uptypes = array (
'Image/jpg ',
'Image/jpeg ',
'Image/png
The function is very simple, the code has comments, directly to the code of the People
Copy CodeThe code is as follows:
/*** Upload images to generate thumbnails** Requires support of GD2 Library** Initialization requires parameter new thumbnails (
/**
* Upload images to generate thumbnails
*
* Requires support of GD2 Library
*
* Initialization requires parameter new thumbnails (' original address of thumbnail image ', ' width of thumbnail ', ' height of thumbnail
This article is mainly for you to introduce the PHP thumbnail generation and image watermark production process, PHP to achieve watermark addition and thumbnail generation of related steps, with a certain reference value, interested in small
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.